Upload Public File to Local Storage
curl --request POST \
--url https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local \
--header 'Content-Type: multipart/form-data' \
--header 'X-Environment-ID: <x-environment-id>' \
--header 'X-File-Name: <x-file-name>' \
--header 'X-File-Type: <x-file-type>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--header 'X-UUID: <x-uuid>' \
--header 'x-api-key: <x-api-key>' \
--form file='@example-file'import requests
url = "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"x-api-key": "<x-api-key>",
"X-File-Type": "<x-file-type>",
"X-File-Name": "<x-file-name>",
"X-Environment-ID": "<x-environment-id>",
"X-Signature": "<x-signature>",
"X-UUID": "<x-uuid>",
"X-Timestamp": "<x-timestamp>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'X-File-Type': '<x-file-type>',
'X-File-Name': '<x-file-name>',
'X-Environment-ID': '<x-environment-id>',
'X-Signature': '<x-signature>',
'X-UUID': '<x-uuid>',
'X-Timestamp': '<x-timestamp>'
}
};
options.body = form;
fetch('https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Environment-ID: <x-environment-id>",
"X-File-Name: <x-file-name>",
"X-File-Type: <x-file-type>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>",
"X-UUID: <x-uuid>",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("X-File-Type", "<x-file-type>")
req.Header.Add("X-File-Name", "<x-file-name>")
req.Header.Add("X-Environment-ID", "<x-environment-id>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-UUID", "<x-uuid>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local")
.header("x-api-key", "<x-api-key>")
.header("X-File-Type", "<x-file-type>")
.header("X-File-Name", "<x-file-name>")
.header("X-Environment-ID", "<x-environment-id>")
.header("X-Signature", "<x-signature>")
.header("X-UUID", "<x-uuid>")
.header("X-Timestamp", "<x-timestamp>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["X-File-Type"] = '<x-file-type>'
request["X-File-Name"] = '<x-file-name>'
request["X-Environment-ID"] = '<x-environment-id>'
request["X-Signature"] = '<x-signature>'
request["X-UUID"] = '<x-uuid>'
request["X-Timestamp"] = '<x-timestamp>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"message": "File uploaded successfully"
}
}{
"error": "fileType is required"
}{
"error": "Not authenticated"
}{
"error": "File upload failed"
}Management API > Storage
Upload Public File to Local Storage
Management API endpoint for uploading public files to local storage. This endpoint requires authentication. File metadata is provided via headers (X-File-Type, X-File-Name, X-Environment-ID, X-Signature, X-UUID, X-Timestamp) and the file is provided as a multipart/form-data file field named “file”. The “Content-Type” header must be set to a valid MIME type.
POST
/
api
/
v1
/
management
/
storage
/
local
Upload Public File to Local Storage
curl --request POST \
--url https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local \
--header 'Content-Type: multipart/form-data' \
--header 'X-Environment-ID: <x-environment-id>' \
--header 'X-File-Name: <x-file-name>' \
--header 'X-File-Type: <x-file-type>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--header 'X-UUID: <x-uuid>' \
--header 'x-api-key: <x-api-key>' \
--form file='@example-file'import requests
url = "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"x-api-key": "<x-api-key>",
"X-File-Type": "<x-file-type>",
"X-File-Name": "<x-file-name>",
"X-Environment-ID": "<x-environment-id>",
"X-Signature": "<x-signature>",
"X-UUID": "<x-uuid>",
"X-Timestamp": "<x-timestamp>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'X-File-Type': '<x-file-type>',
'X-File-Name': '<x-file-name>',
'X-Environment-ID': '<x-environment-id>',
'X-Signature': '<x-signature>',
'X-UUID': '<x-uuid>',
'X-Timestamp': '<x-timestamp>'
}
};
options.body = form;
fetch('https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Environment-ID: <x-environment-id>",
"X-File-Name: <x-file-name>",
"X-File-Type: <x-file-type>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>",
"X-UUID: <x-uuid>",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("X-File-Type", "<x-file-type>")
req.Header.Add("X-File-Name", "<x-file-name>")
req.Header.Add("X-Environment-ID", "<x-environment-id>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-UUID", "<x-uuid>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local")
.header("x-api-key", "<x-api-key>")
.header("X-File-Type", "<x-file-type>")
.header("X-File-Name", "<x-file-name>")
.header("X-Environment-ID", "<x-environment-id>")
.header("X-Signature", "<x-signature>")
.header("X-UUID", "<x-uuid>")
.header("X-Timestamp", "<x-timestamp>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.feedbackflowhq.com/api/v1/api/v1/management/storage/local")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["X-File-Type"] = '<x-file-type>'
request["X-File-Name"] = '<x-file-name>'
request["X-Environment-ID"] = '<x-environment-id>'
request["X-Signature"] = '<x-signature>'
request["X-UUID"] = '<x-uuid>'
request["X-Timestamp"] = '<x-timestamp>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"message": "File uploaded successfully"
}
}{
"error": "fileType is required"
}{
"error": "Not authenticated"
}{
"error": "File upload failed"
}Headers
MIME type of the file. Must be a valid MIME type.
URI encoded file name.
ID of the environment.
Signature for verifying the request.
Unique identifier for the signed upload.
Timestamp used for the signature.
Body
multipart/form-data
The file to be uploaded as a valid file object (buffer).
Response
OK - File uploaded successfully.
Show child attributes
Show child attributes
Was this page helpful?
⌘I